﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace BuiltInT4Templates.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        private SessionRepository _repository;

        public HomeController()
        {
            _repository = new SessionRepository();
        }
        public ActionResult List()
        {
            var sessions = _repository.GetAll();

            return View(sessions);

        }
        public ActionResult Grid()
        {
            var sessions = _repository.GetAll();

            return View(sessions);

        }


        public ActionResult AutoColumns()
        {
            var sessions = _repository.GetAll();

            return View(sessions.ToArray());
            
        }
        public ActionResult Index()
        {
            var sessions = _repository.GetAll();

            return View(sessions);
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
